package com.chzu.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chzu.mapper.DataSourceMapper;
import com.chzu.pojo.DataSource;
import com.chzu.service.IDataSourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author liangzhuo
 * @create 2021-10-21-21:03
 */
@Service
public class DataSourceServiceImpl extends ServiceImpl<DataSourceMapper, DataSource> implements IDataSourceService {

    @Autowired
    private IDataSourceService dataSourceService;
    @Autowired
    private DataSourceMapper dataSourceMapper;

    @Override
    public List<DataSource> getAllDataSource() {
        return dataSourceService.list();
    }

    @Override
    public List<String> getAlltables() {
        return dataSourceMapper.selectAllTables();
    }
}
